Method, apparatus, and artificial intelligence server for determining artificial intelligence behavior

ABSTRACT

According to methods, apparatus and AI servers for determining an AI behavior, a protocol-requesting command sent by an application logic server can be received. The protocol-requesting command can contain an application identifier, a notification message, and current environment data. From a plurality of preset AI systems, an AI system corresponding to the application identifier can be found. The AI system can be formed by a preset plurality of components that include one or more classifying components. From the AI system, a classifying component corresponding to the notification message can be found. The classifying component can be mounted with at least one behavior component. From the classifying component corresponding to the notification message, a behavior component matching the current environment data can be obtained. An AI behavior can be determined based on the obtained behavior component matching the current environment data.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application is a continuation application of PCT Patent ApplicationNo. PCT/CN2014/080401, filed on Jun. 20, 2014, which claims priority toChinese Patent Application No. 201310632411.8, filed on Nov. 29, 2013,the entire contents of both of which are incorporated herein byreference.

FIELD OF THE DISCLOSURE

The present disclosure generally relates to the field of artificialintelligence and, more particularly, relates to methods, apparatus, andartificial intelligence servers for determining an artificialintelligence behavior.

BACKGROUND

Artificial intelligence (AI) refers to technologies that simulate humanthinking and action by using modern tools such as computers. Withcontinuous advancement of AI technologies, AI technologies have beenapplied to various aspects of industrial manufacturing and human life.

For example, when the AI technologies are applied to a game applicationprogram, an entity having human-like behaviors is generated. The entityis an AI agent. Because the AI agent can exhibit intelligent behaviorsand activities similar to intelligent behaviors and activities of ahuman being, or can exhibit characteristics consistent with a player'sthinking and perception, the AI agent can improve playability of thegame application program.

During the design of a specific application program containing AItechnologies, a human-like behavior that is exhibited by an AI agent iscalled an AI behavior. How to determine the AI behavior is the key tomaking the AI agent of the application program exhibit human-likebehaviors. For example, during the design of a game application programinvolving interactions between a human player and a computer,determining AI behaviors can ensure the AI agent in the game can havebehaviors matching the player.

Conventionally, before determining an AI behavior, a programmer usuallyneeds to translate logic of an application program into correspondingcode after the logic of the application program is designed. An AIsystem is thus formed by a combination of the code. That is,conventionally, before determining an AI behavior, for each applicationprogram, a set of corresponding code needs to be developed. During thedetermining of an AI behavior, an application logic server looks upcorresponding code according to current environment data of the AIagent, determines the AI behavior, and thus controls the AI agent toexecute the determined AI behavior, such that the AI agent exhibits theAI behavior matching the current environment data.

However, conventional methods have at least the following problems.Because conventional methods need to determine an AI behavior by usingan application logic server to run code corresponding to an applicationprogram, operation is complicated. In addition, during the determiningof the AI behavior using the application logic server, resources on theapplication logic server is consumed, and running speed of theapplication program is thus affected.

BRIEF SUMMARY OF THE DISCLOSURE

One aspect of the present disclosure includes methods for determining anartificial intelligence (AI) behavior. In an exemplary method, aprotocol-requesting command sent by an application logic server can bereceived. The protocol-requesting command can contain an applicationidentifier, a notification message, and current environment data. From aplurality of preset AI systems, an AI system corresponding to theapplication identifier can be found. The AI system can be formed by apreset plurality of components. The preset plurality of components caninclude one or more classifying components. From the AI systemcorresponding to the application identifier, a classifying componentcorresponding to the notification message can be found. The classifyingcomponent can be mounted with at least one behavior component. From theclassifying component corresponding to the notification message, abehavior component matching the current environment data can beobtained. An AI behavior can be determined based on the obtainedbehavior component matching the current environment data.

Another aspect of the present disclosure includes apparatus fordetermining an AI behavior. An exemplary apparatus can include areceiving module, a finding module, an obtaining module and adetermining module. The receiving module can be configured to receive aprotocol-requesting command sent by an application logic server. Theprotocol-requesting command can contain an application identifier, anotification message, and current environment data. The finding modulecan be configured to find, from a plurality of preset AI systems, an AIsystem corresponding to the application identifier. The AI system can beformed by a preset plurality of components, the preset plurality ofcomponents include one or more classifying components. The findingmodule can be further configured to find, from the AI systemcorresponding to the application identifier, a classifying componentcorresponding to the notification message. The classifying component canbe mounted with at least one behavior component. The obtaining modulecan be configured to obtain, from the classifying componentcorresponding to the notification message, a behavior component matchingthe current environment data. The determining module can be configuredto determine an AI behavior based on the obtained behavior componentmatching the current environment data.

Another aspect of the present disclosure includes AI servers fordetermining an AI behavior. An exemplary AI server can include theapparatus for determining an AI behavior.

Another aspect of the present disclosure includes a non-transitorycomputer-readable medium having computer program. When being executed bya processor, the computer program performs a method for determining anartificial intelligence (AI) behavior. The method includes: receiving aprotocol-requesting command sent by an application logic server, whereinthe protocol-requesting command contains an application identifier, anotification message, and current environment data; finding, from aplurality of preset AI systems, an AI system corresponding to theapplication identifier, wherein the AI system is formed by a presetplurality of components, the preset plurality of components includingone or more classifying components; finding, from the AI systemcorresponding to the application identifier, a classifying componentcorresponding to the notification message, wherein the classifyingcomponent is mounted with at least one behavior component; obtaining,from the classifying component corresponding to the notificationmessage, a behavior component matching the current environment data; anddetermining an AI behavior based on the obtained behavior componentmatching the current environment data.

Other aspects of the present disclosure can be understood by thoseskilled in the art in light of the description, the claims, and thedrawings of the present disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The following drawings are merely examples for illustrative purposesaccording to various disclosed embodiments and are not intended to limitthe scope of the disclosure.

FIG. 1 depicts an exemplary environment for implementing methods fordetermining an AI behavior in accordance with various disclosedembodiments;

FIG. 2 depicts a flow diagram of an exemplary method for determining anAI behavior in accordance with various disclosed embodiments;

FIG. 3 depicts a flow diagram of another exemplary method fordetermining an AI behavior in accordance with various disclosedembodiments;

FIG. 4(a) depicts a structure diagram of component mounting inaccordance with various disclosed embodiments;

FIG. 4(b) depicts a structure diagram of component mounting inaccordance with various disclosed embodiments;

FIG. 5 depicts a structure diagram of an exemplary apparatus fordetermining an AI behavior in accordance with various disclosedembodiments;

FIG. 6 depicts a structure diagram of another exemplary apparatus fordetermining an AI behavior in accordance with various disclosedembodiments;

FIG. 7 depicts a structure diagram of an exemplary determining module inaccordance with various disclosed embodiments;

FIG. 8 depicts a structure diagram of an exemplary AI server inaccordance with various disclosed embodiments;

FIGS. 9A-9F depict classifying and combining components in accordancewith various disclosed embodiments;

FIG. 10 depicts an exemplary process of calling an AI component inaccordance with various disclosed embodiments; and

FIG. 11 depicts an exemplary interactive process between AI componentsand peripheral systems in accordance with various disclosed embodiments.

DETAILED DESCRIPTION

Reference will now be made in detail to exemplary embodiments of thedisclosure, which are illustrated in the accompanying drawings.

With rapid development of computer technology, more and more applicationprograms are applied to people's life and bring great convenience andfun into people's life. With rapid development of AI technologies, moreand more AI technologies are applied to application programs on moderntools such as computers, thus enabling the modern tools such ascomputers to simulate and perform behaviors similar to human thinkingand human behaviors.

When performing human-like behaviors, a modern tool such as a computeris playing a role of an AI Agent. An AI agent generally refers to anentity that has goal(s), behavior(s) and knowledge, and operatesindependently in a certain environment. A typical example of an AI agentis a monster or non-player character (NPC) in an application program. Inaddition, during operation of an application program of war betweenhuman and computer, an AI agent can be a role played by the computer. Abehavior performed by an AI agent that is similar to human thinking andhuman behavior is referred to an AI behavior.

During the design of an application program related to AI technologies,usually a planner of the application program designs a logicrelationship between AI agents in the application program. Next, aprogrammer translates or compiles the logic relationship between the AIagents in the application program into corresponding code via certainspecific programming language. An AI system is thus formed via combiningthe code.

However, because different application programs contain different AIagents, and one application program can contain and implement differentAI agents. Therefore, if behaviors exhibited by each AI agent are allachieved via compiling the code, operation of designing AI systems canbe complex, and can take up significant human resources. In this case,during the determining of an AI behavior of an AI agent in anapplication program based on a designed AI system, operation can be morecomplex.

In view of the problems set forth above and other problems, based oncomponents in a software system, various embodiments provide a methodfor designing an AI system. In addition, according to an AI system basedon component design, methods for determining an AI behavior are providedherein. In order to illustrate the methods for determining an AIbehavior in accordance with various embodiments, various componentsinvolved in the exemplary methods are explained as follows.

Components in accordance with various embodiments can be obtained viaencapsulating code that can achieve specific functions. A component canhave a function independent of other components. Interface betweencomponents can be specified by a contract. A component can have a cleardependence on context, can be deployed independently, and can beassembled. In various embodiments, ‘encapsulating code’ can also bereferred to as ‘packaging code’.

In order to facilitate the subsequent forming of the AI system via thecomponents, in the methods in accordance with various embodiments, codethat can achieve specific functions can be encapsulated in advance.Thus, the encapsulated components can subsequently be directly used. Inaddition, to ease operation of using the components, after thecomponents are encapsulated, corresponding detailed information can beconfigured for each component.

Further, for illustrative purposes, in various embodiments, variousencapsulated components can be classified according to the functionsachieved by the components. Thus, the components can include classifyingcomponent, selecting component, condition component, and/or behaviorcomponent.

A condition component can refer to a component that executes a functionof judging condition(s) and returns result of the judging, e.g., acomponent for judging whether a player currently has a K-of-Hearts card.A behavior component can refer to a component that executes a specifiedfunction (i.e., a function that is set), e.g., a component for playing aK-of-Hearts card. A selecting component can refer to a component thatcan select a component for executing based on certain filtering rule(s).The filtering rules can include, but are not limited to,maximum-weight-selection mode, random-selection mode,sequential-selection mode, or any other appropriate modes. In addition,to classify and manage the various components, a classifying componentcan be introduced. The classifying component is a component forclassifying and managing the various components, and is usually not foroperating functions. The classifying component can be used for managingthe components.

Optionally, the components can also include a complex component. Thecomplex component can be formed to include classifying component(s),selecting component(s), condition component(s), and/or behaviorcomponent(s). The complex component can be used as a componentcollection having a certain AI logic meaning A planner can establishvarious component libraries according to actual needs. The variouscomponent libraries can be called by various AI agents, to improveefficiency of AI design.

Optionally, the disclosed methods can involve AI rule(s). The AI rulescan determine behavior of an AI agent under a certain condition. Forexample, in a game called ‘Legend of Heroes’, when an AI agent does nothave ‘full blood’ (i.e., a certain level of points or energy in the‘Legend of Heroes’ game), the AI agent plays a medicine card. Themedicine card is a certain playing card used in the ‘Legend of Heroes’game.

Optionally, the disclosed methods can involve an AI rule library. The AIrule library can include a configured collection of AI rules that can befor general usage. The AI rules can include, e.g., AI behaviorconfiguration files that match logic of corresponding AI behaviors,respectively. For example, in the ‘Legend of Heroes’ game, the AI rulelibrary can include configured AI trusteeship. An AI behaviorconfiguration file can be configured using, e.g., selectingcomponent(s), behavior component(s), and/or condition component(s), suchthat the AI behavior configuration file has the components combined viaappropriate mounting topology, and thus can implement an AI behaviorthat is consistent with logic corresponding to a preset AI behavior asdesigned by the planner of the application program.

FIG. 1 depicts an exemplary environment for implementing methods fordetermining an AI behavior in accordance with various disclosedembodiments. The environment for implementing methods for determining AIbehavior, in accordance with various disclosed embodiments, can includean application logic server and an AI server. An AI system of at leastone application can be mounted on the AI server. AI systems of variousapplications can be implemented via calling preset components.

For example, as shown in FIG. 1, a type of mounting between componentscan include the following. A classifying component can have at least oneselecting component or at least one condition component mounted thereon.A selecting component can have at least one behavior component mountedthereon. A behavior component can have at least one condition componentmounted thereon. When the application logic server and the AI serverinteract to complete a method for determining AI behavior, theapplication logic server needs to synchronize all application programenvironment data to, or with, the AI server.

As used herein, wherever applicable, ‘application program can be usedinterchangeably with ‘application’. An application or applicationprogram can refer to any appropriate software program that achieves acertain specific purpose. As used herein, unless otherwise specified,‘having a component mounted’ can be used interchangeably with ‘beingmounted with a component’.

Based on the above, various embodiments provide methods for determiningAI behavior. FIG. 2 depicts a flow diagram of an exemplary method fordetermining an AI behavior in accordance with various disclosedembodiments. As shown in FIG. 2, the method can include the followingexemplary steps.

In Step 101, a protocol-requesting command sent by an application logicserver is received. The protocol-requesting command can contain anapplication identifier, a notification message, and current environmentdata.

In Step 102, an AI system corresponding to the application identifier isfound from multiple preset AI systems, and a classifying componentcorresponding to the notification message is found from the AI systemcorresponding to the application identifier. The AI system can be formedby preset multiple components. The preset multiple components caninclude one or more classifying component. The classifying component canhave at least one behavior component mounted thereon.

In Step 103, a behavior component matching the current environment datais obtained via the classifying component corresponding to thenotification message, and an AI behavior is determined based on thebehavior component matching the current environment data.

Optionally, before finding the AI system corresponding to theapplication identifier from multiple preset AI systems, the method canfurther include the following steps. Code for accomplishing specificfunctions is encapsulated into components for accomplishing the specificfunctions. The components can include selecting component(s), behaviorcomponent(s), and condition component(s). Multiple groups of componentsare selected from the components. For each group of components, aclassifying component can be configured for managing the group ofcomponents. One or more of each group of components and the classifyingcomponent for managing the group of components can be used to form an AIsystem corresponding to an application program. Thus, multiple AIsystems respectively corresponding to multiple application programs canbe obtained.

Optionally, a classifying component can have at least one selectingcomponent or at least one condition component mounted thereon. Aselecting component can have at least one behavior component mountedthereon. A behavior component can have at least one condition componentmounted thereon.

Optionally, according to practical needs, a component can be indirectlymounted on another component. For example, a classifying component canhave a behavior component mounted, and the behavior g component can havea condition component mounted. In this case, it can be referred to asthat the classifying component has the condition component mounted.

Optionally, the obtaining of the behavior component matching the currentenvironment data via the classifying component corresponding to thenotification message can include, but is not limited to the followingsteps. Multiple condition components mounted on the classifyingcomponent corresponding to the notification message can be scanned, todetermine at least one condition component matching the currentenvironment data. At least one behavior component mounted with the atleast one condition component matching the current environment data canbe activated. A selecting component on which the at least one behaviorcomponent is mounted can select, from the at least one behaviorcomponent, a behavior component matching the current environment data.

In various embodiments, scanning the condition components mounted on theclassifying component can refer to traversing the condition components.That is, each condition components mounted on the classifying componentis visited one at a time in a certain appropriate order. During thevisiting, information can be obtained from the each conditioncomponents.

Optionally, before the protocol-requesting command sent by anapplication logic server is received, the following process can beincluded. All application program environment data synchronized to theAI server can be received. In this case, multiple condition componentsmounted on the classifying component corresponding to the notificationmessage can be scanned, to determine at least one condition componentmatching the current environment data. The scanning and the determiningcan include the following steps. For example, the scanning of themultiple condition components to determine the at least one conditioncomponent can include, but is not limited to the following process.Among the all application program environment data, application programenvironment data corresponding to at least one condition component ofthe multiple condition components is found. It can be determined whetherthe current environment data satisfy the application program environmentdata corresponding to the at least one condition component of themultiple condition components. When the current environment data satisfythe application program environment data corresponding to the at leastone condition component of the multiple condition components, the atleast one condition component satisfied by the current environment datacan be determined to be the at least one condition component matchingthe current environment data.

In the method according to various disclosed embodiments, an AI systemcorresponding to an application identifier can be found from multiplepreset AI systems. A classifying component corresponding to anotification message can be found from the AI system corresponding tothe application identifier. A behavior component matching currentenvironment data can be obtained via the classifying componentcorresponding to the notification message. An AI behavior can bedetermined based on the behavior component matching the currentenvironment data. Thus, an AI behavior no longer needs to be determinedvia operation code. An AI behavior can be directly determined bydetermining an AI behavior component from multiple components that formthe AI system. The operation can be simplified. In addition, theoperation of determining an AI behavior can be achieved without using anapplication logic server. Thus, operation speed of the applicationprogram can be improved, and users can be provided with desiredoperation experience.

FIG. 3 depicts a flow diagram of another exemplary method fordetermining an AI behavior in accordance with various disclosedembodiments. The exemplary method can be implemented on an AI server inan exemplary environment, e.g., as shown in FIG. 1.

In various embodiments, an AI server can have AI systems of variousapplication programs mounted thereon. The AI systems of the variousapplication programs can be obtained by combining various encapsulatedcomponents. An application logic server can include a server thatprovides specific application program logic service for multiple clientterminals. The AI server can determine AI behaviors of an AI agent froman AI system according to current environment data, by receivinginteraction protocol(s) of the application logic server and users of theclient terminals.

Referring to FIG. 3, an exemplary method for determining an AI behaviorcan include the follow steps. In Step 201, an AI server encapsulatescode for achieving specific functions into components for achieving thespecific functions. The components can include classifying component,selecting component, condition component, and/or behavior component. TheAI server can select multiple groups of components from the components,and, for each group of components, can configure a classifying componentfor managing the group of components.

In order to simplify operation of AI systems of various applicationprograms, the AI server can encapsulate code for achieving specificfunctions into components for achieving the specific functions. Anencapsulated component can be a single-input single-output softwareentity, can have relatively independent function(s) and haveversatility. When various application programs need to achieve similaror same functions, the functions can be achieved by calling the samecomponents. Methods for encapsulating code for achieving specificfunctions into components for achieving specific functions are notlimited in the present disclosure.

In addition, because functions achieved by various components can bedifferent, after the code is encapsulated into components, theencapsulated components can be divided into, e.g., selecting component,condition component, and/or behavior component, according to thefunctions achieved by the components. Further, in order to classify andmanage the components and ensure that, during the usage of thecomponents, the most appropriate component can be searched with theleast time consumed, the AI server can divide the encapsulatedcomponents into groups and, for each group of components, configure aclassifying component for managing the group of components. After theclassifying components are configured, during the usage of thecomponents, the AI server can select components via a correspondingclassifying component according to the functions to be achieved.

Specific contents of the classifying components can vary, and can bedetermined according to logic of application programs, withoutlimitation. In actual applications, e.g., in applications of playingcards, board games, etc., the classifying components can include aclassifying component of playing basic playing cards, a classifyingcomponent of determining status of AI agent props, or classifyingcomponents of any other appropriate operations.

There can be many various types of methods for mounting between theencapsulated components. In specific application programs, the methodfor mounting components can be determined according to input-outputrelationships between the various components.

For example, FIG. 4(a) depicts a structure diagram of component mountingin accordance with various disclosed embodiments. As shown in FIG. 4(a),a classifying component can have at least one selecting componentmounted thereon. A selecting component can have at least one behaviorcomponent mounted thereon. A behavior component can have at least onecondition component mounted thereon.

In addition, FIG. 4(b) depicts a structure diagram of component mountingin accordance with various disclosed embodiments. As shown in FIG. 4(b),a classifying component can have at least one condition componentdirectly mounted thereon.

In Step 202, the AI server forms an AI system of an application programusing one or more of each group of components and the classifyingcomponent for managing the each group of components, to obtain orestablish AI systems respectively corresponding to multiple applicationprograms.

For example, after the components are encapsulated, the AI server canform an AI system of an application program using each group ofcomponents and the classifying component for managing the each group ofcomponents, according to logic relationship(s) in the applicationprogram. Such a process of combining various components can be performedrepeatedly, to obtain AI systems respectively corresponding to multipleapplication programs. To distinguish the AI system corresponding to eachapplication program, an identifier can be set for each AI system. Theidentifier can uniquely correspond to, i.e., have a one-to-onecorrespondence with, an identifier of the application program thatcorresponds to the identifier. Thus, during the determining of the AIsystem of a certain application program, only the identifier of the AIsystem that corresponds to the identifier of the application programneeds to be looked up and found. In various embodiments, one AI systemcan correspond to one application program.

By combining components to form AI systems of various applicationprograms, the formation of the AI systems can be achieved simply bycombining encapsulated components according to logic of the applicationprograms. Compiling code according to logic of the application programsis thus no longer necessary. Operation of forming AI systems ofapplication programs can thus be simpler. In addition, because eachcomponent can have a single function, the components can thus bearbitrarily assembled according to a certain logic relationship.Therefore, one component can be applied to various application programsor various AI agents of one application program. The encapsulatedcomponents can thus have desired versatility.

Steps 201-202 can be basic steps for designing an AI system based oncomponents. Via Steps 201-202, AI system of at least one applicationprogram can be designed as a basis for calling components, and furtheras a basis for subsequently determining AI behaviors for AI agents.Therefore, Steps 201-202 does not need to be performed every time duringthe determining of AI behaviors, and can be optionally performedaccording to needs of actual application.

In Step 203, the AI server receives a protocol-requesting command sentby an application logic server. The protocol-requesting command cancontain an application identifier, a notification message, and currentenvironment data.

During interaction with a user of a client terminal, when theapplication logic server needs the AI server to accordingly implement acertain AI behavior, the application logic server can send aprotocol-requesting command to the AI server. In order to trigger stepsthat can subsequently determine the AI behavior according to theprotocol-requesting command, the AI server needs to receive theprotocol-requesting command sent by the application logic server. Themethods for the application logic server to send the protocol-requestingcommand to the AI server, and the method for the AI server to receivethe protocol-requesting command sent by the application logic server canbe any appropriate methods, and are not limited in the presentdisclosure.

Because the AI server can have various AI systems mounted thereon, inorder to distinguish AI systems of various different applicationprograms, the protocol-requesting command may need to contain anapplication identifier, i.e., an identifier of the application program.In addition, the AI server classifies and manages various componentsstored internally, to obtain various classifying components. Thus, inorder to clearly inform the AI server of the type or kind of the certainbehavior that the application logic server currently wants the AI serverto match, the protocol-requesting command may need to contain anotification message. The AI server can locate a correspondingclassifying component according to the notification message, in order toensure that the behavior that the application logic server currentlywants the AI server to match can be subsequently selected from or viathe classifying component corresponding to the notification message.

Further, the AI server may need to determine next behavior of a currentAI agent according to the current state of a player or other AI agents.Therefore, the protocol-requesting command may need to contain currentenvironment data. The current environment data is not limited in thepresent disclosure and can be set according to needs of actualapplications. For example, in application programs of playing cards,board games, etc. for a human to play against a computer, after a playerplays a playing card having a symbol 10-of-Hearts, in order for the AIserver to determine a playing card that the AI agent needs to playaccording to the 10-of-Hearts card played by the player, the datadescribing the player playing the 10-of-Hearts card can be the currentenvironment data and such current environment data can be contained inthe protocol-requesting command.

For ease of description, in various embodiments where an applicationprogram of playing cards is described, a playing card can be referred toas a card. ‘A playing card having a symbol 10-of-Hearts’ can also bereferred to as ‘a 10-of-Hearts card’. Playing cards having other symbolscan be referred to in a similar manner. ‘A playing card’ can be referredto as ‘a card’.

In Step 204, the AI server finds an AI system corresponding to theapplication identifier from multiple preset AI systems, and finds aclassifying component corresponding to the notification message from theAI system corresponding to the application identifier. The AI server canhave various AI systems mounted thereon, and the various AI systems canhave various classifying components respectively manage variouscomponents. Therefore, after the AI server receives theprotocol-requesting command sent by the application logic server, the AIserver can find an AI system corresponding to the application identifierfrom multiple preset AI systems, and can find a classifying componentcorresponding to the notification message from the AI systemcorresponding to the application identifier.

The AI server can find an AI system corresponding to the applicationidentifier from multiple preset AI systems in various ways. For example,the AI server can store AI systems of various different applicationprograms in different internal storage structures, and apply labels tothe storage structures for storing the AI systems of the applicationprograms. The labels can respectively match the identifiers of the AIsystems of the application programs. In this case, after the AI serverreceives the protocol-requesting command containing the applicationidentifier, the AI server can look up and find the AI systemcorresponding to the application identifier from the multiple preset AIsystems, via looking up and finding the storage structure matching theapplication identifier from the labels corresponding to the differentstorage structures.

Further, after finding the AI system corresponding to the applicationidentifier, the AI system can find, via the notification message, aclassifying component corresponding to the notification message from theAI system corresponding to the application identifier.

For example, when the notification message includes a message thatinforming the AI agent of playing a card, the AI server can locate aclassifying component of playing basic playing cards. In addition, theAI server can subsequently obtain a behavior component from theclassifying component of playing basic playing cards, to determine theAI behavior of the AI agent.

In Step 205, the AI server obtains a behavior component matching thecurrent environment data from the classifying component corresponding tothe notification message, and determines an AI behavior based on thebehavior component matching the current environment data.

The AI server can receive a protocol-requesting command sent by anapplication logic server in order to accomplish a purpose of making thecurrent AI agent perform a behavior to match the behaviors of players orother AI agents. That is, the AI server may need to determine a behaviorto match the behavior of players or other AI agents. In addition, thebehavior performed by AI agent matches the current environment data.Therefore, the AI server may need to obtain a behavior componentmatching the current environment data from the classifying componentcorresponding to the notification message. After the AI server obtains abehavior component matching the current environment data, the AI servercan determine an AI behavior based on the obtained behavior componentmatching the current environment data. The behavior component matchingthe current environment data can include the behavior that AI serverdetermines to match the current environment data.

The AI server can obtain a behavior component matching the currentenvironment data from the classifying component corresponding to thenotification message in various ways. For example, the components can bemounted as shown in FIG. 4(a), i.e., a classifying component can have atleast one selecting component mounted thereon, a selecting component canhave at least one behavior component mounted thereon, and a behaviorcomponent can have at least one condition component mounted thereon.Having such a mounted structure, during the determining of the AIbehavior by the AI server, the AI server needs to integrate the currentenvironment data into the process of determining. When the currentenvironment data satisfy a condition corresponding to a preset conditioncomponent, the AI server can decide to perform a certain behavior. Whenthe current environment data do not satisfy the condition correspondingto the preset condition component, the AI server can decide not toperform the certain behavior.

Therefore, the AI server can obtain a behavior component matching thecurrent environment data from the classifying component corresponding tothe notification message in processes including, but not limited to, thefollow steps. For example, multiple condition components mounted on theclassifying component corresponding to the notification message can bescanned, to determine at least one condition component matching thecurrent environment data. At least one behavior component mounted on theat least one condition component matching the current environment datacan be activated. A selecting component mounted with at least onebehavior component can select a behavior component matching the currentenvironment data from the at least one behavior component, according topreset filtering rule(s).

The filtering rules can include, but are not limited to, amaximum-weight-selection mode, a random-selection mode, asequential-selection mode, or any other appropriate modes. In differentapplication programs, or for different AI agents in differentenvironments, the AI behaviors exhibited can be different. Therefore,when the AI server obtains a behavior component matching the currentenvironment data from the classifying component corresponding to thenotification message, the behavior component needs to be determinedbased on the current environment data. Even in the same environment, abehavior component may need to be determined according appropriatefiltering rules.

Optionally, contents involved in an application program, e.g., rules,can usually be determined via judging relationship between data.Therefore, before the AI server receives the protocol-requesting commandsent by the application logic server, the method can further include thefollowing step(s). That is, AI server can receive all applicationprogram environment data synchronized by the application logic server.The all application program environment data can include all datainvolved for running the application program.

The AI server can receive the all application program environment datasynchronized by the application logic server in various ways. Forexample, when the application logic server synchronizes the allapplication program environment data via a socket mode, the AI servercan receive the all application program environment data synchronized bythe application logic server via the socket mode.

In addition, when the application logic server synchronizes the allapplication program environment data, full-synchronization mode orincremental-synchronization mode can be used. When the application logicserver synchronizes the all application program environment data using acertain method, the AI server can receive the all application programenvironment data synchronized by the application logic server using thesame method correspondingly.

After the AI server receives the all application program environmentdata synchronized by the application logic server, the AI server cancorrespondingly scan multiple condition components mounted on theclassifying component corresponding to the notification message, todetermine at least one condition component matching the currentenvironment data. Such a process can include, but is not limited to thefollowing steps. Among the all application program environment data,application program environment data corresponding to at least onecondition component of the multiple condition components is found.Accordingly, the at least one condition component corresponding to theapplication program environment data can be found from the multiplecondition components (mounted on the classifying component). It can bedetermined whether the current environment data satisfy the applicationprogram environment data corresponding to the at least one conditioncomponent of the multiple condition components. When the currentenvironment data satisfy the application program environment datacorresponding to the at least one condition component of the multiplecondition components, the at least one condition component satisfied bythe current environment data can be determined to be the at least onecondition component matching the current environment data.

In various embodiments, “application program environment datacorresponding to a condition component” can refer to application programenvironment data consistent with the condition component. In otherwords, the condition of the condition component, and the behaviorcomponent having the condition component mounted are consistent with theapplication program environment data. When current environment datasatisfy the at least one condition component (i.e., causing the at leastone condition component to return ‘True’), the current environment dataalso satisfy the application program environment data corresponding tothe at least one condition component.

As used herein, wherever applicable, satisfying application programenvironment data refers to meeting or complying with the applicationprogram environment data. Satisfying a condition component refers tomeeting, complying with, or being consistent with, the conditioncomponent.

For illustrative purposes, the following example can demonstrate the AIserver obtains a behavior component matching the current environmentdata from the classifying component corresponding to the notificationmessage. For example, in a certain application program, a player canplay cards against a computer. According to rules of the applicationprogram, the player needs to compare value with cards played by an AIagent that the computer acts as. The player or the computer can win byplaying a card that is in the same suit with, but has a greater valuethan, a card played by the other side.

Assuming that in one round, the player plays a 5-of-Hearts card. Inorder to compete according the rules of the application program, the AIagent needs to play a card greater than the 5-of-Hearts card.

In this case, the AI server can obtain a behavior component matching thecurrent environment data from the classifying component corresponding tothe notification message using the following process. For example, amongthe all application program environment data, the AI server can findapplication program environment data corresponding to at least onecondition component of the multiple condition components. The AI servercan thus find condition component(s) corresponding to playing a cardgreater than the 5-of-Hearts card played by the player. The AI servercan then determine which cards currently held by the AI agent match thecondition component(s) corresponding to the player's playing a cardgreater than the 5-of-Hearts card, and the condition component(s) can befound from the all application program environment data. Assuming the AIagent currently has a 10-of-Hearts card, a K-of-Hearts card, and anA-of-Hearts card, in this case, the AI server can determine that thecurrent environment data matches application program environment datacorresponding to three condition components. At this time, the AI servercan determine that the three condition components satisfied by thecurrent environment data are the at least one condition componentmatching the current environment data.

In the example as described above, the all application programenvironment data can include anything related to the gaming environment,e.g., cards the player and the AI agent each have. The applicationprogram environment data can include cards the AI agent currently hasand can play. For example, the application program environment data caninclude a 10-of-Hearts card, a K-of-Hearts card, and an A-of-Heartscard, and/or other cards the AI agent currently have. Conditioncomponents corresponding to the application program environment data canrefer to condition components consistent with the cards the AI agentcurrently have.

Still referring to the example as described above, the currentenvironment data can include that the player currently plays the5-of-Hearts card. When the current environment data satisfy the threecondition components corresponding to the application programenvironment data, it can mean that, according to pre-designed game rules(implemented via the mounting structures of components), the currentenvironment data satisfy the conditions of the three conditioncomponents corresponding to playing the three cards (10-of-Hearts card,a K-of-Hearts card, and an A-of-Hearts card). In other words, thecurrent environment data satisfy the application program environmentdata.

In the component topology structure as shown in FIG. 4(a), a behaviorcomponent can have at least one condition component mounted thereon.Therefore, the AI server can activate the behavior component having thethree condition components mounted. In addition, because a selectingcomponent has the behavior component(s) mounted, the selecting componentof the behavior component(s) that has the three condition componentsmounted can select a behavior component matching the current environmentdata from the at least one behavior component, according to presetfiltering rule(s).

For example, in the application program, a playing card with a symbol Ais the greatest value, a playing card with a symbol K is the nextgreatest value, and so on. When the AI server determines that the playerhas played a 5-of-Hearts card, the AI agent currently has a 10-of-Heartscard, a K-of-Hearts card, and an A-of-Hearts card. In this case, theselecting component can use a random-selection mode to randomly select acard in order to play a card greater than the card played by the player.However, because two high-value cards of Hearts are all held by the AIagent, the AI agent can play any one of the K-of-Hearts card and theA-of-Hearts card in order to defeat the player in this round. Therefore,in this case, the AI server can select one card from the K-of-Heartscard and the A-of-Hearts card using maximum-weight-selection mode.Further, because the K-of-Hearts card is smaller than the A-of-Heartscard, in this case, the AI agent can play the K-of-Hearts card to defeatthe player and does not need to play the A-of-Hearts card. Therefore,the AI server can calculate to decide that the K-of-Hearts card shouldbe played using the preset maximum-weight-selection mode.

Thus, the AI server can determine that the behavior component having thecondition component corresponding to the K-of-Hearts card mounted is thebehavior component matching the current environment data, and further,can determine that an AI behavior of playing the K-of-Hearts card to bethe behavior matching the current environment data. At this time, the AIserver has determined that an AI behavior of playing the K-of-Heartscard is the behavior matching the current playing of the 5-of-Heartscard by the player.

Optionally, after the AI behavior is determined based on the behaviorcomponent matching the current environment data, the disclosed methodcan further include the following steps. The AI server executes the AIbehavior, generates a result of executing the AI behavior, and sends theresult of executing the AI behavior to the application logic server. Forexample, in the example of playing card as described above, after the AIserver executes the AI behavior of playing the K-of-Hearts card, theresult of executing the AI behavior is sent to the application logicserver corresponding to the application program. In this case, theresult obtained by the application logic server is that the AI agent hasplayed a K-of-Hearts card.

In the method according to various disclosed embodiments, an AI systemcorresponding to an application identifier can be found from multiplepreset AI systems. A classifying component corresponding to anotification message can be found from the AI system corresponding tothe application identifier. A behavior component matching currentenvironment data can be obtained via the classifying componentcorresponding to the notification message. An AI behavior can bedetermined based on the behavior component matching the currentenvironment data. Thus, AI behavior no longer needs to be determined viaoperation code. An AI behavior can be directly determined by determiningan AI behavior component from multiple components that form the AIsystem. The operation can be simplified. In addition, the operation ofdetermining an AI behavior can be achieved without using an applicationlogic server. Thus, operation speed of the application program can beimproved, and users can be provided with desired operation experience.

FIG. 5 depicts a structure diagram of an exemplary apparatus fordetermining an AI behavior in accordance with various disclosedembodiments. As shown in FIG. 5, the apparatus can include a receivingmodule 401, a finding module 402, an obtaining module 403, and/or adetermining module 404. Certain modules can be omitted and other modulescan be included.

The receiving module 401 is configured to receive a protocol-requestingcommand sent by an application logic server. The protocol-requestingcommand can contain an application identifier, a notification message,and current environment data.

The finding module 402 is configured to find an AI system correspondingto the application identifier from multiple preset AI systems, and finda classifying component corresponding to the notification message fromthe AI system corresponding to the application identifier. The AI systemcan be formed by preset multiple components. The preset multiplecomponents can include one or more classifying components. Theclassifying component can have at least one behavior component mountedthereon.

The obtaining module 403 is configured to obtain a behavior componentmatching the current environment data from the classifying componentcorresponding to the notification message. The determining module 404 isconfigured to determine an AI behavior based on the behavior componentmatching the current environment data.

FIG. 6 depicts a structure diagram of another exemplary apparatus fordetermining an AI behavior in accordance with various disclosedembodiments. As shown in FIG. 6, the apparatus can optionally include anencapsulating module 405, a configuring module 406, and/or a formingmodule 407. The forming module 407 can also be referred to as a gettingmodule 407, a second obtaining module 407, or a forming-and-obtainingmodule 407.

The encapsulating module 405 is configured to encapsulate code forachieving specific functions into components for achieving specificfunctions. The components can include classifying component, selectingcomponent, condition component, and/or behavior component. Theconfiguring module 406 is configured to select multiple groups of theencapsulated components and, for each group of components, configure aclassifying component is for managing the group of components. Theforming-and-obtaining module 407 is configured to form an AI system ofan application program using one or more of each group of components andthe classifying component for managing the each group of components, toobtain AI systems corresponding to multiple application programs.

Optionally, the classifying component for managing the group ofcomponents that is configured by the configuring module 406 can have atleast one selecting component or at least condition component mountedthereon. A selecting component can have at least one behavior componentmounted thereon. A behavior component can have at least one conditioncomponent mounted thereon.

FIG. 7 depicts a structure diagram of an exemplary determining module inaccordance with various disclosed embodiments. As shown in FIG. 7, theobtaining module 403 can include, but is not limited to, a scanning unit4031, a determining unit 4032, an activating unit 4033, and/or aselecting unit 4034. Certain unit s can be omitted and other units canbe included.

The scanning unit 4031 is configured to scan multiple conditioncomponents mounted on the classifying component corresponding to thenotification message. The determining unit 4032 is configured todetermine at least one condition component matching the currentenvironment data.

The activating unit 4033 is configured to activate at least one behaviorcomponent mounted on the at least one condition component matching thecurrent environment data. The selecting unit 4034 is configured toselect, using a selecting component on which the at least one behaviorcomponent is mounted, a behavior component matching the currentenvironment data from the at least one behavior component.

Optionally, the receiving module 401 is further configured to receiveall application program environment data synchronized by the applicationlogic server. The determining unit 4032 is further configured to find,from the all application program environment data, application programenvironment data corresponding to at least one condition component ofthe multiple condition components, and to determine whether the currentenvironment data satisfy the application program environment datacorresponding to the at least one condition component of the multiplecondition components. When the current environment data satisfy theapplication program environment data corresponding to the at least onecondition component of the multiple condition components, the at leastone condition component satisfied by the current environment data can bedetermined to be the at least one condition component matching thecurrent environment data.

By using the apparatus according to various disclosed embodiments, an AIsystem corresponding to an application identifier can be found frommultiple preset AI systems. A classifying component corresponding to anotification message can be found from the AI system corresponding tothe application identifier. A behavior component matching currentenvironment data can be obtained via the classifying componentcorresponding to the notification message. An AI behavior can bedetermined based on the behavior component matching the currentenvironment data. Thus, AI behavior no longer needs to be determined viaoperation code. An AI behavior can be directly determined by determiningan AI behavior component from multiple components that form the AIsystem. The operation can be simplified. In addition, the operation ofdetermining an AI behavior can be achieved without using an applicationlogic server. Thus, operation speed of the application program can beimproved, and users can be provided with desired operation experience.

Various embodiments also provide an AI server. The AI server can includean apparatus for determining AI behavior. The apparatus can be the sameor similar to the apparatus in accordance with various disclosedembodiments, e.g., as shown in FIGS. 5-7.

By using the AI server according to various disclosed embodiments, an AIsystem corresponding to an application identifier can be found frommultiple preset AI systems. A classifying component corresponding to anotification message can be found from the AI system corresponding tothe application identifier. A behavior component matching currentenvironment data can be obtained via the classifying componentcorresponding to the notification message. An AI behavior can bedetermined based on the behavior component matching the currentenvironment data. Thus, AI behavior no longer needs to be determined viaoperation code. An AI behavior can be directly determined by determiningan AI behavior component from multiple components that form the AIsystem. The operation can be simplified. In addition, the operation ofdetermining an AI behavior can be achieved without using an applicationlogic server. Thus, operation speed of the application program can beimproved, and users can be provided with desired operation experience.

FIG. 8 depicts a structure diagram of an exemplary AI server inaccordance with various disclosed embodiments. The AI server 700 asshown in FIG. 8 may various significantly depending on configuration orperformance, and is not limited by the structure shown in FIG. 8. The AIserver 700 can include on or more central processing units (CPU) 722(e.g., one or more processors), a memory 732, one or more storage media730 that has application program(s) 742 and/or data 744 stored (e.g.,one or more mass storage devices). The memory 732 and the storage medium730 may include temporary storage or persistent storage. Programs storedon the storage medium 730 may include one or more modules. Each modulecan include a series of instructions for operating the server. Further,the CPU 722 can be configured to communicate with the storage medium730, and to execute the series of instructions stored on the storagemedium 730 to operate the server 700.

The AI server 700 may further include one or more power sources 726, oneor more wired or wireless network interfaces 750, one or moreinput-output interfaces 758, one or more keyboards 756, and/or one ormore operating systems 741, e.g., Windows Server™, Mac OS X™, Unix™,Linux™, FreeBSD™, or any other appropriate operating systems.

When the apparatus for determining AI behavior as disclosed in variousembodiments determines an AI behavior, the functional modules aredivided as above for illustrative purposes. In practical applications,according to actual needs, the above-described functions can beallocated to different functional modules to be accomplished. That is,the internal structure of the apparatus can be divided into differentfunctional modules to accomplished part or all of the above-describedfunctions. Further details of the apparatus for determining AI behaviorare described in the methods for determining AI behavior accordingvarious embodiments.

In certain embodiments, AI components can be classified and combinedusing the following ways. For example, a behavior component can be acomponent that can execute a specified function. A behavior componentcan be mounted on a selecting component, and can have a conditioncomponent mounted thereon.

FIGS. 9A-9F depict classifying and combining components in accordancewith various disclosed embodiments. As shown in FIG. 9A, a conditioncomponent can be mounted on a behavior component or a classifyingcomponent.

In addition, a condition component can have other conditions, i.e.,other condition component(s), embedded or mounted. A condition componentcan be used for executing judgment for condition(s), to determinewhether a component having the condition component mounted can beselected. Condition components can be divided into two categoriesincluding logic-relation condition component and logic conditioncomponent.

A logic-relation condition component can determine a logic relationbetween logic condition components that are mounted thereon. The logicrelation can include, e.g., AND, OR, NOT, and any other appropriaterelations.

A logic-AND condition component (as shown in FIG. 9B) returns True whenall the logic condition components mounted thereon returns True.Otherwise, when not all the logic condition components mounted thereonreturns True, the logic-AND condition component returns False. When nologic condition components are mounted thereon, the logic-AND conditioncomponent can return False.

A logic-OR condition component (as shown in FIG. 9C) returns True whenone or more of the logic condition components mounted thereon returnsTrue. Otherwise, when none of the logic condition components mountedthereon returns True, the logic-OR condition component returns False.When no logic condition components are mounted thereon, the logic ORcondition component can return False.

A logic-NOT condition component (as shown in FIG. 9D) can have only onecondition component mounted thereon. The logic-NOT condition componentreturns False when the mounted condition components mounted thereonreturns True. Otherwise, when the mounted condition components mountedthereon returns False, the logic-NOT condition component returns True.When no logic condition components are mounted thereon, the logic-NOTcondition component can return False.

A logic condition component can include a logic condition. Various logicconditions can have various meanings, respectively. Whether a logiccondition is determined to be True can be determined according toprotocol data and game environment data that request a matching AIbehavior. For example, a logic condition component can determine whetheran AI agent is alive, or determine whether an AI agent is in a state ofwalking, etc.

A selecting component can select a behavior component for executingaccording to a certain filtering rule(s). A selecting component can bemounted on a classifying component, and can have multiple behaviorcomponents mounted thereon, e.g., as shown in FIG. 9E. A classifyingcomponent can have multiple selecting components mounted thereon, e.g.,as shown in FIG. 9F.

FIG. 10 depicts an exemplary process of calling an AI component inaccordance with various disclosed embodiments. As shown in FIG. 10, inStep 601, a method for testing an AI component is executed. The methodfor testing the AI component can be referred to as a Test.

In Step 602, when the AI component passes the Test, a correspondingcalculation method is executed. The calculation method can be referredto as a Tick. When the AI component does not pass the Test, a nextcomponent can be looked for and found, and Step 601 can be executed.

In Step 603, an AI task is generated. Only an AI behavior component cangenerate the AI task. Other components can generate a Dummy Task.

In Step 604, an AI behavior result is obtained. The AI behavior resultcan be sent to a corresponding game logic server via agreement orprotocol.

FIG. 11 depicts an exemplary interactive process between AI componentsand peripheral systems in accordance with various disclosed embodiments.As shown in FIG. 11, componentization of AI can meet the needs of AIcalculation for various games. Via receiving interaction protocolsbetween a game logic server and a user of a client using an AI server, acorresponding AI system can calculate a currently-optimal user behavioror AI behavior, and send the currently-optimal user behavior or AIbehavior to the game logic server via the interaction protocols.

The game logic server can be configured to provide service of specificgame-play logic for multiple clients, synchronize game environment datato a corresponding AI system on the AI server, and request a matching AIbehavior (i.e., an AI behavior matching game environment data), andreceive the result of the operation from the AI server. For example, inthe Legend of Heroes game, the game logic server can be MainSvr.

An AI server can have any AI systems of various games mounted thereon.Each AI system can be loaded with a specified AI rule library, and cancache or buffer the matching game environment data. For example, in theLegend of Heroes game, the AI server can be AISvr. For example, one AIsystem can contain one or more AI rule libraries.

A data access layer (DataProxyImpl) can be used for implementing accessinterface for the game environment data, and can provide data servicefor the AI components. The AI rule library can be formed by and includeclassifying components (used as main categories after classifying AIrule), selecting components, behavior components, and/or conditioncomponents. The AI rule library can include the components organized asa tree structure.

Referring to FIG. 11, an interaction process between AI components andperipheral systems can include the following steps. In Step 1, a gamelogic server synchronizes game environment data to a corresponding AIsystem or AI server via socket. Mechanism of the synchronization caninclude full-synchronization mode or incremental-synchronization mode.

In Step 2, the game logic server requests a current matching AI behaviorfrom the AI server. In Step 3, the game logic server locates anappropriate AI system.

In Step 4, the AI system finds a corresponding AI rule library accordingto a current protocol-requesting command. In Step 5, the AI rule finds acorresponding classifying component according to data of the currentprotocol-requesting command.

In Step 6, the classifying component attempts to match the data of thecurrent protocol-requesting command with behavior components undervarious selecting component. In Step 7, the behavior components arematched using condition components.

In Step 8, the condition components determine whether a currentcondition component passes (i.e., returns True), according to data ofthe current protocol-requesting command, and by having the data accesslayer inquiring the current game environment data. In Step 9, when acondition of a condition component mounted on a behavior componentpasses, the behavior component is screened by its parent component(i.e., a selecting component), via maximum-weight-selection mode,random-selection mode, sequential-selection mode, or any otherappropriate modes. The selecting component can thus select an optimalbehavior component and submit the optimal behavior component to the AIsystem.

In Step 10, the AI system executes the current optimal behaviorcomponent and sends a result of the executing to the AI server. In Step11, the AI server sends the result (i.e., the result of the operation)to the game logic server via socket.

Part or all of the steps in the methods in accordance with variousembodiments can be accomplished using hardware, or using aprogram/software to instruct related hardware. The program/software canbe stored in a non-transitory computer-readable storage mediumincluding, e.g., ROM/RAM, magnetic disk, optical disk, etc.

The embodiments disclosed herein are exemplary only. Other applications,advantages, alternations, modifications, or equivalents to the disclosedembodiments are obvious to those skilled in the art and are intended tobe encompassed within the scope of the present disclosure.

INDUSTRIAL APPLICABILITY AND ADVANTAGEOUS EFFECTS

Without limiting the scope of any claim and/or the specification,examples of industrial applicability and certain advantageous effects ofthe disclosed embodiments are listed for illustrative purposes. Variousalternations, modifications, or equivalents to the technical solutionsof the disclosed embodiments can be obvious to those skilled in the artand can be included in this disclosure.

The disclosed methods, apparatus and artificial intelligence (AI)servers can be used in a variety of computer applications. The computerapplications can include any application programs that involve AItechnology. The application programs can include, but are not limitedto, games, online transaction, and computer-aided interactive learning.

By using the methods, apparatus, and AI servers according to variousdisclosed embodiments, an AI system corresponding to an applicationidentifier can be found from multiple preset AI systems. A classifyingcomponent corresponding to a notification message can be found from theAI system corresponding to the application identifier. A behaviorcomponent matching current environment data can be obtained via theclassifying component corresponding to the notification message. An AIbehavior can be determined based on the behavior component matching thecurrent environment data. Thus, AI behavior no longer needs to bedetermined via operation code. An AI behavior can be directly determinedby determining an AI behavior component from multiple components thatform the AI system. The operation can be simplified. In addition, theoperation of determining an AI behavior can be achieved without using anapplication logic server. Thus, operation speed of the applicationprogram can be improved, and users can be provided with desiredoperation experience.

What is claimed is:
 1. A method for determining an artificialintelligence (AI) behavior, comprising: receiving a protocol-requestingcommand sent by an application logic server, wherein theprotocol-requesting command contains an application identifier, anotification message, and current environment data; finding, from aplurality of preset AI systems, an AI system related to the applicationidentifier via looking up and finding a storage structure matching theapplication identifier from different storage structures, wherein the AIsystem is formed by a preset plurality of components, the presetplurality of components including one or more classifying components;finding, from the AI system related to the application identifier, aclassifying component related to the notification message, wherein theclassifying component is mounted with at least one behavior component;obtaining, from the classifying component related to the notificationmessage, a behavior component matching the current environment data; anddetermining an AI behavior based on the obtained behavior componentmatching the current environment data.
 2. The method according to claim1, wherein, before finding the AI system related to the applicationidentifier from the plurality of preset AI systems, the method furtherincludes: encapsulating code for achieving specific functions intocomponents for achieving the specific functions, wherein the componentsfor achieving the specific functions include selecting components,condition components, and behavior components; selecting a plurality ofgroups of components from the components for achieving the specificfunctions, and configuring a classifying component for componentmanaging of each group of the plurality of groups of components; andforming one AI system including the each group of the plurality ofgroups of components, and the each group including the classifyingcomponent for component managing, the one AI system related to oneapplication program; obtaining the plurality of AI systems related to aplurality of application programs.
 3. The method according to claim 2,wherein: the classifying component for component managing is mountedwith at least one selecting component or at least one conditioncomponent; the at least one selecting component is mounted with at leastone behavior component; and the at least one behavior component ismounted with the at least one condition component.
 4. The methodaccording to claim 1, wherein the obtaining of the behavior componentmatching the current environment data from the classifying componentrelated to the notification message includes: scanning a plurality ofcondition components mounted on the classifying component related to thenotification message, to determine at least one condition componentmatching the current environment data; activating at least one behaviorcomponent mounted with the at least one condition component matching thecurrent environment data; and selecting, by using a selecting componentmounted with the at least one behavior component, the behavior componentmatching the current environment data from the at least one behaviorcomponent, based on a filtering rule.
 5. The method according to claim4, wherein before receiving the protocol-requesting command sent by theapplication logic server, the method further includes: receiving allapplication program environment data synchronized with the applicationlogic server; and wherein the scanning of the plurality of conditioncomponents mounted on the classifying component related to thenotification message to determine the at least one condition componentmatching the current environment data includes: finding, among the allapplication program environment data, application program environmentdata related to the at least one condition component of the plurality ofcondition components, and determining whether the current environmentdata satisfy the application program environment data related to the atleast one condition component of the plurality of condition components;and when the current environment data satisfy the application programenvironment data related to the at least one condition component of theplurality of condition components, determining the at least onecondition component of the plurality of condition components satisfiedwith the current environment data as the at least one conditioncomponent matching the current environment data.
 6. An apparatus fordetermining an AI behavior, comprising: a memory; a processor coupled tothe memory; a plurality of program modules stored in the memory to beexecuted by the processor, the plurality of program modules comprising:a receiving module configured to receive a protocol-requesting commandsent by an application logic server, wherein the protocol-requestingcommand contains an application identifier, a notification message, andcurrent environment data; a finding module configured to: find, from aplurality of preset AI systems, an AI system related to the applicationidentifier via looking up and finding a storage structure matching theapplication identifier from different storage structures, wherein the AIsystem is formed by a preset plurality of components, the presetplurality of components include one or more classifying components; andfind, from the AI system related to the application identifier, aclassifying component related to the notification message, wherein theclassifying component is mounted with at least one behavior component;an obtaining module configured to obtain, from the classifying componentrelated to the notification message, a behavior component matching thecurrent environment data; and a determining module configured todetermine an AI behavior based on the obtained behavior componentmatching the current environment data.
 7. The apparatus according toclaim 6, the plurality of program modules further including: anencapsulating module configured to encapsulate code for achievingspecific functions into components for achieving the specific functions,wherein the components for achieving the specific functions includeselecting components, condition components, and behavior components; aconfiguring module configured to select a plurality of groups ofcomponents from the components for achieving the specific functions, andconfigure a classifying component for component managing of each groupof the plurality of groups of components; and a forming-and-obtainingmodule configured to: form one AI system including the each group of theplurality of groups of components and the classifying component forcomponent managing of the each group, the one AI system related to oneapplication program; and obtain the plurality of AI systems related to aplurality of application programs.
 8. The apparatus according to claim7, wherein: the classifying component for component managing of the eachgroup of components is mounted with at least one selecting component orat least one condition component; the at least one selecting componentis mounted with at least one behavior component; and the at least onebehavior component is mounted with the at least one condition component.9. The apparatus according to claim 6, wherein the obtaining moduleincludes: a scanning unit configured to scan a plurality of conditioncomponents mounted on the classifying component related to thenotification message; a determining unit configured to determine atleast one condition component matching the current environment data; anactivating unit configured to activate at least one behavior componentmounted with the at least one condition component matching the currentenvironment data; and a selecting unit configured to select, by using aselecting component mounted with the at least one behavior component,the behavior component matching the current environment data from the atleast one behavior component, based on a filtering rule.
 10. Theapparatus according to claim 9, wherein: the receiving module is furtherconfigured to: receive all application program environment datasynchronized with the application logic server; and the determining unitis configured to: find, among the all application program environmentdata, application program environment data related to the at least onecondition component of the plurality of condition components, anddetermine whether the current environment data satisfy the applicationprogram environment data related to the at least one condition componentof the plurality of condition components; and when the currentenvironment data satisfy the application program environment datarelated to the at least one condition component of the plurality ofcondition components, determine the at least one condition component ofthe plurality of condition components satisfied with the currentenvironment data as the at least one condition component matching thecurrent environment data.
 11. A non-transitory computer-readable mediumhaving computer program for, when being executed by a processor,performing a method for determining an artificial intelligence (AI)behavior, the method comprising: receiving a protocol-requesting commandsent by an application logic server, wherein the protocol-requestingcommand contains an application identifier, a notification message, andcurrent environment data; finding, from a plurality of preset AIsystems, an AI system related to the application identifier via lookingup and finding a storage structure matching the application identifierfrom different storage structures, wherein the AI system is formed by apreset plurality of components, the preset plurality of componentsincluding one or more classifying components; finding, from the AIsystem related to the application identifier, a classifying componentrelated to the notification message, wherein the classifying componentis mounted with at least one behavior component; obtaining, from theclassifying component related to the notification message, a behaviorcomponent matching the current environment data; and determining an AIbehavior based on the obtained behavior component matching the currentenvironment data.
 12. The non-transitory computer-readable mediumaccording to claim 11, wherein, before finding the AI system related tothe application identifier from the plurality of preset AI systems, themethod further includes: encapsulating code for achieving specificfunctions into components for achieving the specific functions, whereinthe components for achieving the specific functions include selectingcomponents, condition components, and behavior components; selecting aplurality of groups of components from the components for achieving thespecific functions, and configuring a classifying component forcomponent managing of each group of the plurality of groups ofcomponents; and forming one AI system including the each group of theplurality of groups of components and the classifying component forcomponent managing of the each group, the one AI system related to oneapplication program; obtaining the plurality of AI systems related to aplurality of application programs.
 13. The non-transitorycomputer-readable medium according to claim 12, wherein: the classifyingcomponent for component managing of the each group of components ismounted with at least one selecting component or at least one conditioncomponent; the at least one selecting component is mounted with at leastone behavior component; and the at least one behavior component ismounted with the at least one condition component.
 14. Thenon-transitory computer-readable medium according to claim 11, whereinthe obtaining of the behavior component matching the current environmentdata from the classifying component related to the notification messageincludes: scanning a plurality of condition components mounted on theclassifying component related to the notification message, to determineat least one condition component matching the current environment data;activating at least one behavior component mounted with the at least onecondition component matching the current environment data; andselecting, by using a selecting component mounted with the at least onebehavior component, the behavior component matching the currentenvironment data from the at least one behavior component, based on afiltering rule.
 15. The non-transitory computer-readable mediumaccording to claim 14, wherein before receiving the protocol-requestingcommand sent by the application logic server, the method furtherincludes: receiving all application program environment datasynchronized with the application logic server; and wherein the scanningof the plurality of condition components mounted on the classifyingcomponent related to the notification message to determine the at leastone condition component matching the current environment data includes:finding, among the all application program environment data, applicationprogram environment data related to the at least one condition componentof the plurality of condition components, and determining whether thecurrent environment data satisfy the application program environmentdata related to the at least one condition component of the plurality ofcondition components; and when the current environment data satisfy theapplication program environment data related to the at least onecondition component of the plurality of condition components,determining the at least one condition component of the plurality ofcondition components satisfied with the current environment data as theat least one condition component matching the current environment data.16. The method according to claim 1, wherein when the notificationmessage includes a message that informing the AI system of playing acard, the application logic server obtains the behavior component fromthe classifying component of playing basic playing cards to determinethe AI behavior of the AI system.
 17. The method according to claim 4,wherein the filtering rule comprises a maximum-weight-selection mode, arandom-selection mode, a sequential-selection mode, or any otherappropriate modes.